import torch
import torch.nn.functional as F
import torch.nn as nn

class NN(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim):
        super(NN, self).__init__()
        self.input_dim = input_dim
        self.output_dim = output_dim
        self.hidden_dim = hidden_dim
        self.fc1 = nn.Linear(self.input_dim, self.hidden_dim).cuda()
        self.addl = nn.Linear(self.hidden_dim, 100).cuda()
        self.fc2 = nn.Linear(100, 200).cuda()
        self.fc3 = nn.Linear(200, 300).cuda()
        self.fc4 = nn.Linear(300, self.output_dim).cuda()
        self.dropout = nn.Dropout(p=0.7)
    def forward(self, x):
        x = F.relu(self.fc1(x))
        x = self.dropout(x)
        x = F.relu(self.addl(x))
        x = self.dropout(x)
        x = F.softmax(self.fc2(x))
        x = self.dropout(x)
        x = F.relu(self.fc3(x))
        x = self.dropout(x)
        x = F.relu(self.fc4(x))
        return x